package cn.ruituo.adv5;

import cn.ruituo.adv2.Student;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ReadObj {
    public static void main(String[] args) {
        //读对象
        try {
            ObjectInputStream oin=new ObjectInputStream(new FileInputStream("72loser.obj"));
            Student stu=(Student)oin.readObject();
            oin.close();
            System.out.println(stu);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
